package cn.keniykey.mc.landterritory.vault;

import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.Plugin;

public abstract class Econ {
	private static Econ econ;
	
	static {
		Plugin vault = Bukkit.getPluginManager().getPlugin("Vault");
		try {
			if (vault != null) econ = new EconVault();
		}catch(Exception ex) {
		}
		if(econ == null) econ = new EconNull();
	}
	public static Econ getEcon() {
		return Econ.econ;
	}
	
	public abstract boolean isEnable();
	public abstract boolean give(OfflinePlayer p,double price);
	public abstract boolean take(OfflinePlayer p,double price);
	public abstract double get(OfflinePlayer p);
	public abstract boolean has(OfflinePlayer p,double price);
}
